package com.hnevc.exception;
class DivideZeroException extends Exception{
	public DivideZeroException() {
		super();
	}
	public DivideZeroException(String message){
		super(message);
	}
}
public class Test {
	public static int divide(int a, int b) throws DivideZeroException {
		if(b==0){
			throw new DivideZeroException("除以0异常");  
		}
		return a / b;
	}

	public static void main(String[] args)  {
		try{
			int result = divide(10, 0);
			System.out.println(result);
		}catch(DivideZeroException e){
			e.printStackTrace();
		}
		System.out.println("程序继续执行");
	}
}
